Introduction

This analysis explores relationships between indicators across countries such as GDP per capita and prevalence of current tobacco usage (% of adults) using World Bank data. The question to be investigated is:

1. How does GDP per capita relate to the prevalence of current tobacco use (% of adults)?

For this analysis, we consider the following indicators:

World Bank Indicators
Variable Indicator Name Definition
NY.GDP.PCAP.PP.KD GDP per capita, PPP (constant 2021 international $) GDP per capita based on purchasing power parity (PPP). PPP GDP is gross domestic product converted to international dollars using purchasing power parity rates. An international dollar has the same purchasing power over GDP as the U.S. dollar has in the United States. GDP at purchaser’s prices is the sum of gross value added by all resident producers in the country plus any product taxes and minus any subsidies not included in the value of the products. It is calculated without making deductions for depreciation of fabricated assets or for depletion and degradation of natural resources. Data are in constant 2021 international dollars.
SH.PRV.SMOK Prevalence of current tobacco use (% of adults) The percentage of the population ages 15 years and over who currently use any tobacco product (smoked and/or smokeless tobacco) on a daily or non-daily basis. Tobacco products include cigarettes, pipes, cigars, cigarillos, waterpipes (hookah, shisha), bidis, kretek, heated tobacco products, and all forms of smokeless (oral and nasal) tobacco. Tobacco products exclude e-cigarettes (which do not contain tobacco), “e-cigars”, “e-hookahs”, JUUL and “e-pipes”. The rates are age-standardized to the WHO Standard Population.

(Sources: https://data.worldbank.org/indicator/NY.GDP.PCAP.PP.KD?view=chart, https://data.worldbank.org/indicator/SH.PRV.SMOK?view=chart)

Agenda

1.) GDP per capita and prevalence of current tobacco usage

1.1.) Exploration of data in last year and derivation/application of yearly grouping

1.2.) Scatter plot of interested variables

1.3.) Scatter plot of interested variables; except outlier Qatar

1.4.) Scatter plot of interested variables with faceted years

1.5.) Scatter plot of interested variables with faceted years with density curves

1.6.) Kullback-Leibler divergence for tobacco usage

1. GDP per capita and prevalence of current tobacco use

We analyze how the GDP per capita for the observed countries relates to the prevalence of current tobacco use, representing the percentage of adults currently consuming tobacco. To get an overview over the interested data and be able to evaluate future insights correctly, we start by looking at the data available to us.

## [1] "Are there no missing values? - Answer: FALSE"
## [1] "How many missing values are in the data regarding GDP per capita? - Answer: 0"
## [1] "How many missing values are in the data regarding tobacco prevalence? - Answer: 382"
## # A tibble: 1 × 3
## # Groups:   Country Name [1]
##   `Country Name` SH.PRV.SMOK     n
##   <chr>                <dbl> <int>
## 1 Aruba                   NA    22

As we can see, there is no data available for Aruba during the 22 years of time stretching from 2000 to 2021. Therefore, we drop Aruba from our analysis. Further, we check if there are any years in which the data is missing for several countries at the same time.

## # A tibble: 7 × 2
##    Year count_na
##   <int>    <int>
## 1  2000        1
## 2  2005        1
## 3  2010        1
## 4  2015        1
## 5  2018        1
## 6  2019        1
## 7  2020        1

Knowing there are only 25 countries to investigate, we only have data of the years 2000, 2005, 2010, 1015, 1018, 2019 and 2020 on percentage of tobacco usage in the adult population of all 24 countries (excluding Aruba). We adjust our data accordingly, so that those years will be the only ones we are considering when moving forward.

1.1. Exploration of data in last year and derivation/application of yearly grouping

To take a look at the grouping of our data by tobacco usage, we will display a plot of the most recent data in Year 2020.


For an overview we take a look at the Comparison of tobacco usage and GDP in 2020. Therefore we group by the relative tobacco usage.


Now we view only one dot per category of relative tobacco usage.


Now take a look of the coherence of the variables without our extreme value of the group “Very Low”.


To get a better overview we take a look at all years. First only on years we have data of their tobacco consumption on.


Now over all years we have data on their countries BIP.


But maybe better facett over year to show better the coherence of BIP and tobacco consumption.


Hier sehen wir, dass die Gruppierung nicht für jedes Jahr angebracht ist. Später wollen wir die Daten für jedes Jahr neu gruppieren.
Nun aber nochmal ohne unser lineares Modell, da durch den Wert für unser sehr niedrigen Tabbakkonsum dieses nicht geeignet ist.


Wenn wir nun für jede Gruppe alle Länder anzeigen lassen, sieht der Plot so aus:


Hier fällt erneut auf, dass der relative Tabakkonsum nicht immer gut eingeordnet ist, da Gruppen mit (eingeordnet) weniger Tabakkonsum tatsächlich teilweise mehr Tabak konsumieren. Hier sollte man sich überlegen, ob es nicht besser ist die Gruppierung für jedes Jahr neu zu bestimmen. Dieses Ergebnis wollen wir dann in einem Barplot festhalten.
Hier nun also erst mit der allgemeineren Gruppierung:


Und nun mit neuer Gruppierung der Daten:


Hierzu nun erst der nach Jahr gefacettete Dotplot:


Und nun mit nicht-linearer smooth line:


Auffällig ist, dass anders als bei den allgemein gruppierten Daten (über den Durchschnitt des Tabakkonsums eines Landes) hier nun die Länder mit relativ gesehen sehr niedrigem Tabakkonsum ein viel höheres BIP haben, als aus der vorherigen Gruppierung hervorgeht. Demnach ist es durchaus sinnvoll, die Daten jährlich neu zu gruppieren, wenn die Zugehörigkeit zu einer bestimmten Gruppe eines Landes sich über die Jahre ändern kann.
Und nun mit Datenpunkt pro Land:


Hier sieht man nun deutlich, wie der Ausreißer einer anderen Gruppe zugeordnet wurde für die Jahre 2000-2010 und somit, warum unsere Daten nun andere Zusammenhänge zeigen.
Und nun im Barplot:


Nun wollen wir noch die Varianz für jede Gruppe in ihren HIV Werten überprüfen, da Mittelwertsberechnungen schnell verzerrt sein können. Dafür betrachten wir nun botplots für jede Kategorie.


Hier nochmal nach Jahr facetiert:


Hier Barplots facettiert nach jahr, wobei nach Tabakdurchschnittskonsum gruppiert wurde:


Und nun Barplots facettiert nach Jahr, wobei jedes jahr neu nach Tabakkonsum gruppiert wurde:


So how does GDP per capita relate to the prevalence of current tobacco use (% of adults)?

Was bedeutet BIP pro Kopf genau? Bruttoinlandsprodukt (BIP): Der Gesamtwert aller Waren und Dienstleistungen, die innerhalb eines Landes in einem bestimmten Zeitraum (z. B. ein Jahr) produziert werden. Pro Kopf: Das BIP wird durch die Gesamtbevölkerung des Landes geteilt, um eine durchschnittliche Wirtschaftskraft pro Einwohner zu ermitteln. Das BIP soll einen Blick in den Lebensstandard einer Bevölkerung geben können, da es möglichst kaufkraftbereinigt ist.
Zu beachten ist, dass eindeutige Aussagen nicht getroffen werden können, da hier ein Land je nach durchschnittlichem Tabakkonsum einer Kategorie zugeordnet wird, wobei das BIP pro Kopf wiederum ein Durchschnittswert ist. Die Aussage beispielsweise, dass wenn ein Mensch viel Tabak konsumiert, er im Durchschnitt auch ein recht hohes Einkommen/Umsatz hat, ist nicht zu treffen, einerseits da die Daten eine derartige Interpretation nicht zulassen und BIP nicht das Einkommen charakterisiert. So kann nämlich gerade in Ländern mit hohem BIP die arme Bevölkerung besonders viel Tabak konsumieren, wenn die relativ sehr extreme Armut (bei einem eher hohen Lebensstandard im Land) als Ursache von diesem gesehen werden will. Dadurch werden Werte verzerrt. Wie sich diese Werte dann bilden, ist aber ebenfalls nicht bekannt, da die Einkommensverteilung im BIP nicht berücksichtigt wird. (Anmerkung: fiktives Beispiel). Diese Verhältnisse können wir aus den Daten also mit Sicherheit nicht herauslesen.
Jedoch können wir folgende Aussagen, anhand der letzten Grafik treffen:
Sichtbar ist, dass je größer der durchschnittliche Tabakkonsum im Land desto tendentiell geringer ist das BIP pro Kopf.
Einzelne Ausnahmen, fallen jedoch auf:
Für die Jahre 2000, 2005 und 2010 ist festzustellen, dass Länder mit großem durchschnittlichen Tabakkonsum das höchste BIP pro Kopf der im Datensatz aufgeführten Länder aufgewiesen hatten.
Dies ändert sich in den Jahren 2015, 2018, 2019 und 2020. Hier ist auffällig, dass Länder mit relativ gesehen sehr geringem Tabakkonsum das gerinste BIP pro Kopf aller aufgeführten Länder aufwiesen.
Für alle anderen Kategorien an relativem Tabakkonsum, gilt die anfängliche Erkenntnisse, dass mit relativ gesehen größeren Tabakkonsum der BIP pro Kopf relativ gesehen geringer ist.

In the following, we want to investigate the relationship further by taking a step back and looking at the data without the yearly grouping. This is now done by starting with the initial comparison of the two variables without taking the time of data acquisition into account.

1.2. Scatter plot of interested variables

We observe a slight positive relationship while the direction of this relationship seems to be heavily influenced by the high GDP per capita and low tobacco prevalence outliers in the upper left hand area of the plot according to the different regression models used.

As we are looking at the data without any consideration of time, we want to check whether those data points all belong to the same country and, if that is actually the case, what the relationship would look like without this one-country-bias.

1.3. Scatter plot of interested variables; except outlier Qatar

## # A tibble: 7 × 6
##   `Country Name` `Country Code`  Year NY.GDP.PCAP.PP.KD SH.PRV.SMOK
##   <chr>          <chr>          <int>             <dbl>       <dbl>
## 1 Katar          QAT             2000            93050.        13.5
## 2 Katar          QAT             2005           104825.        13  
## 3 Katar          QAT             2010           121765.        12.6
## 4 Katar          QAT             2015           119502.        12.2
## 5 Katar          QAT             2018           107185.        12  
## 6 Katar          QAT             2019           106366.        12  
## 7 Katar          QAT             2020           104322.        11.8
## # ℹ 1 more variable: cat_tob_usage <ord>

The removal of the Qatari data points leads us to slightly positive relationships for both, the linear as well as the robust-linear regression, visualized by the basically parallel straights divided only by marginal vertical differences.

Keeping this influence of the outliers in mind, we want to do the small intermediate step to check which of the linear relationship is actually represented in each of the observable years and introduce another form of regression to get deeper understanding of how much the robust-linear representation is appropriate.

1.4. Scatter plot of interested variables with faceted years

It seems that the Qatari data point in each of the years is still highly influential on the linear relationship. However, the relationship develops to more synchronized behaviour between the robust and non-robust relationship, with the non-robust changing from slightly negative to slightly positive.

But looking at the distribution of the data points within each facet, something very interesting is happening. With the higher density of points in the horizontal middle of the cloud and the simultaneous deviation of some of those points in the higher GDP direction, we can recognize a presumably new relationship we want to visualize next.

1.5. Scatter plot of interested variables with faceted years with density curves

We recognize the basically neutral relation in the year 2000 changing over time. Each year the trend gains slight positive increase, meaning over time, it changes towards the relationship of the more the country’s GDP per capita, the higher its prevalence of tobacco use among adults. Further, it gets obvious that the general distribution of the data points moves to the left on the x-axis, so generally smaller occurrences of tobacco prevalence as time goes by. The same phenomenon can be observed when looking at the dashed vertical line in the density visualization below the scatter plots, as the mean decreases from each observed year to the next. Having said that, we recognize slightly contrary movement on the y-axis, meaning higher GDP per capita for some of the countries, especially the points in the middle of the facets increase in GDP per capita.
Moreover, the kernel density estimation seems to assimilate towards the normal distribution around the observed datas’ means and standard deviations comparing the start and end of the timeframe.

1.6. Kullback-Leibler divergence for tobacco usage

This can be proven by calculating the Kullback-Leibler divergence for each of the years, comparing the KDE with the underlying normal distribution to check the accuracy of describing our empirical distribution by normal distribution.

Jahr KLD (Breite = 2) KLD (Breite = 3) KLD (Breite = 4) KLD (Breite = 5)
2000 2.200456 1.3355127 0.7760908 0.4404161
2005 1.586584 0.8072496 0.4215260 0.2421420
2010 1.240258 0.5280582 0.2541619 0.1773269
2015 1.320069 0.5467187 0.2812418 0.2232322
2018 1.242548 0.5700443 0.3211268 0.2709994
2019 1.242548 0.5700443 0.3211268 0.2709994
2020 1.229573 0.5707539 0.3241600 0.2755441

As we can see, there are clear differences between 2000 and 2020, regardless of granularity determined by the chosen bandwidth. Compared to the start of the time span, the empirical distribution clearly attunes closer to the normal distribution at the end. However, the closest for each of the bandwidths is always 2010. For the bandwidth of two it is the only one which decreases from 2015 onwards again till the end. The wider bandwidths on the other hand, which smooth out the individual data points more with the risk of over-smoothing, decrease only for the first three facets and then increase again, all be it with marginal differences from 2018 to 2020.

In summary though and after a clear convergence in the early 2000s, the convergence towards a normally distributed prevalence of tobacco usage among adults stagnated slightly over the last years tending to a backwards development but not strong enough to make any assumptions for future developments. Still, with the general average consumption decreasing.